<?php
	if(isset( $_GET['mabv']))
	{
		$MaBinhLuan = $_GET['id'];
		$MaBaiViet = $_GET['mabv'];
		$binhluan = new binhluanbs();
		$binhluan->MaBinhLuan = $MaBinhLuan;
		
		$kq = $binhluan->Delete();
		
		if($kq)
		{
			$str = "Location: baiviet_chitiet_" . $MaBaiViet;
			header($str);
		}
		else
			ThongBaoLoi("Lỗi truy vấn!");
	}elseif(isset( $_GET['msp']))
	{
		
		$MaBinhLuan = $_GET['id'];
		$MaSanPham = $_GET['msp'];
		$binhluan = new binhluanbs();
		$binhluan->MaBinhLuan = $MaBinhLuan;
		
		$kq = $binhluan->Delete();
		
		if($kq)
		{
			$str = "Location: san-pham-chi-tiet-" . $MaSanPham;
			header($str);
		}
		else
			ThongBaoLoi("Lỗi truy vấn!");
	}
?>